package com.wang.jmonkey.discovery.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @Description 配置eureka server服务验证
 * @Author HeJiawang
 * @Date 2021/5/8 10:18
 */
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        // eureka server开启验证后，要禁用csrf，eureka client才能链接注册中心
        http.csrf().disable();

        super.configure(http);
    }
}
